package edu.upc.fib.lamsandroid.client.dialog;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class MessageBoxDialog {

    private final Context context;

    public MessageBoxDialog(Context context) {
        this.context = context;
    }

    public void show(String message) {
        AlertDialog ad = new AlertDialog.Builder(context).create();
        ad.setCancelable(false);
        ad.setMessage(message);

        ad.setButton(AlertDialog.BUTTON_POSITIVE, "Ok", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });

        ad.show();
    }
}
